package com.jzy.bxb.model.mongo.entity;

import java.util.Date;

import org.mongodb.morphia.annotations.Id;
import org.mongodb.morphia.annotations.Indexed;

import com.jzy.bxb.core.handler.HandlerEntity;
import com.jzy.bxb.core.util.IntUtil;

/**
 * 订单
 * 
 * @author JiangZhiYong
 *
 */
@HandlerEntity
public class Order {

	@Id
	private long id;

	/** 雇主id */
	@Indexed
	private long employerId;

	/** 帮手id */
	@Indexed
	private long assistantId;

	/** 订单状态 */
	private int state;
	
	/**下单时间*/
	private Date createTime;

	/** 服務地址 */
	private Address address;
	
	/**雇主点号*/
	private String employerPhone;

	public Order() {
		this.id = IntUtil.getId();
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public long getEmployerId() {
		return employerId;
	}

	public void setEmployerId(long employerId) {
		this.employerId = employerId;
	}

	public long getAssistantId() {
		return assistantId;
	}

	public void setAssistantId(long assistantId) {
		this.assistantId = assistantId;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getEmployerPhone() {
		return employerPhone;
	}

	public void setEmployerPhone(String employerPhone) {
		this.employerPhone = employerPhone;
	}
	
	

}
